第 4 步:此函数将遍历列表并将每个索引及其值打印到控制台。

  • 并将Loop through List拖入print_grades
  • value更改为grademy_list更改为list_of_grades
  • 并将Get Index of Value拖入print_grades的循环中。双缩进!
  • my_var更改为index ,将my_list更改为list_of_grades ,并将my_param更改为grade

To navigate the page using the TAB key, first press ESC to exit the code editor.

# THIS ACTIVITY IS IN PREVIEW ONLY MODE
  • Run Code
  • Submit Work
  • Next Activity
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)